package com.chihuo.dao;

import com.chihuo.bussiness.Desk;
import com.chihuo.resource.MyConstants;

public class DeskDao extends GenericHibernateDAO﻿<Desk, Integer> {
	@Override
	public Desk saveOrUpdate(Desk entity) {
		getSession().saveOrUpdate(entity);

		DaoUtil.saveOrUpdateLog(MyConstants.DESK_TABLE, entity.getId());
		return entity;
	}

	@Override
	public void delete(Desk entity) {
		getSession().delete(entity);
		DaoUtil.deleteLog(MyConstants.DESK_TABLE, entity.getId());
	}
}
